package playn.game.core;

public class Button {
	
	private int x;
	private int y;
	private int width;
	private int height;
	private String id;
	
	public Button(int x,int y,int width,int height,String id){
		this.x=x;
		this.y=y;
		this.width=width;
		this.height=height;
		this.id=id;
	}

	public String id() {
		return this.id;
	}
	
	public boolean clicked(int x,int y){
		if((x>this.x)&&(y>this.y)&&(x<(this.x+this.width))&&(y<(this.y+this.height))){
			return true;
		}
		
		return false;
	}

}
